<template>
	<view class="flex-shrink shop_gwtitle" style="height: 100rpx;">
		<view class="fixed-top xpy gwtitle font w-100 flex justify-between align-center bg-white" style="height:100rpx;line-height: 0;">
			<view @click="handleIndex" class=" flex justify-center align-center ml-2">
				<uni-icons class="icons" type="shop" size="20"></uni-icons>
				<view class="pl-1">{{title}}</view>
				<uni-icons class="icons" type="right" size="15"></uni-icons>
			</view>
			<view>
				<slot></slot>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			// 背景颜色
			title: {
				type: String,
				default: ""
			},
		},
		data() {
			return {
				
			};
		},
		methods: {
			handleIndex(){
				uni.reLaunch({
					url:"/pages/index/index"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@media screen and (max-width:480px) {
		.shop_gwtitle{
			height: 0 !important ;
		}
	}
	
	.icons{
		padding-top: 1rpx;
	}
	.fixed-top {
	  position: fixed;
	  top: 130rpx;
	  right: 0;
	  left: 0;
	  z-index: 1030;
	}

</style>